Document that PR #62549 has already been ported #1848
Closed
+53
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR documents the investigation of microsoft/TypeScript#62549 and confirms that the change has already been successfully ported to the Go codebase.
Background
PR #62549 "Consistently resolve to the
errorType
onarguments
with error" modifies the TypeScript checker to passignoreArrowFunctions: true
when checking ifarguments
is used in a property initializer or class static block. This ensures thatarguments
inside arrow functions within property initializers resolves toerrorType
(displaying as typeany
), making the behavior consistent.Interesting Discovery
The change from PR #62549 was actually ported to the Go codebase before it was merged into TypeScript!
Timeline
arguments
should not be allowed in class static block TypeScript#48172 (which added theignoreArrowFunctions
parameter)arguments
should not be allowed in class static block" #1828: The Go implementation already passedignoreArrowFunctions: true
for thearguments
checkAs noted in the PR #1828 review:
Current State
The equivalent change is already present in the Go codebase at
internal/checker/checker.go:10599
:Verification
argumentsUsedInClassFieldInitializerOrStaticInitializationBlock
passesany
type instead ofIArguments
forarguments
in arrow functions within property initializers)Conclusion
No code changes are needed. This PR adds documentation (
PR_62549_PORT_STATUS.md
) to record that the change has been successfully ported and is functioning correctly. In fact, the Go port led the way, and TypeScript followed!Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
https://api.github.com/repos/microsoft/typescript/pulls/62549
curl -s REDACTED
(http block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
Note
Custom agent used: Strada to Corsa Port Expert
A Go and TypeScript expert who can easily figure out how to port PRs from one language to another
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.